913b9813b8168a934b61651aecb1fdb18dd1a0e5,src/main/java/hudson/plugins/gradle/Gradle.java,Gradle,getGradleWrapperFile,#AbstractBuild#Launcher#EnvVars#,293

Before Change


            execName = wrapperScriptNormalized;
        }

        return new FilePath(build.getModuleRoot(), execName);
    }

    private String passPropertyOption() {

After Change


            int i = buildFile.lastIndexOf(fileSeparator);
            if (i > 0) {
                // Check if there is a wrapper script at the target project's dir.
                FilePath candidate = new FilePath(normalizedRootBuildScriptDir == null ? build.getModuleRoot() : normalizedRootBuildScriptDir, buildFile.substring(0, i));
                if (candidate.isDirectory() && new FilePath(candidate, execName).exists()) {
                    // Use gradle wrapper file from the target project.
                    gradleWrapperLocation = candidate;